import { request } from '@/network/request'

// 获取歌单标签
export const getSongTags = () => {
  return request({
    url: '/playlist/catlist'
  })
}
// 获取精品歌单推荐
export const getSongListRecommend = (cat = '全部', limit = 20) => {
  return request({
    url: '/top/playlist/highquality',
    params: {
      cat,
      limit
    }
  })
}
// 获取歌单推荐列表
export const getSongList = (cat = '全部', limit = 0, offset = 0) => {
  return request({
    url: '/top/playlist',
    params: {
      cat,
      limit,
      offset
    }
  })
}
// 获取歌单详情
export const getSongDetailList = (id) => {
  return request({
    url: '/playlist/detail',
    params: {
      id
    }
  })
}
// 获取热门评论
export const getPopularCommend = params => {
  return request({
    url: '/comment/hot',
    params
  })
}
// 获取最新评论
export const getNewCommend = params => {
  return request({
    url: 'comment/playlist',
    params
  })
}
// 发表评论
export const getCommend = (params) => {
  return request({
    url: '/comment',
    params
  })
}
// 获取歌曲收藏者
export const getColletor = (id, limit) => {
  return request({
    url: '/playlist/subscribers',
    params: {
      id,
      limit
    }
  })
}